{* load lang file *}
{config_load file="lang`$smarty.const.PLANG`.txt" section="search"}

<div class="entry">
	<form id="searchForm" method="post" action="{$SERVER_ROOT}search/">
	    <label>{#find#}:</label>
	    <input type="text" name="word" maxlength="64" id="searchInput" value="{$smarty.post.word|strip_tags}" />
	    <input type="submit" value="Search" />
	</form>
	<p>{#help#}</p>
	
	{if $smarty.post.word}
		<h3>{#res1#} ({#total#} {$searchTotal}{if $searchTotal > 25}, {#shown#} 25{/if})</h3>
		{if $searchResults}
			<ol>
			{foreach from=$searchResults item=entry}
				<li><a href="{$entry.url}">{$entry.subject}</a> <span class="date">{$entry.intime|date_format:'%d.%m.%Y // %H:%M'}</span><br /><span class="searchtext">{$entry.content|strip_tags|truncate:255}</span></li>
			{/foreach}
			</ol>
		{else}
			<p>{#noJoy#}</p>
		{/if}
	{/if}
</div>